package my.stock.controller;

import lombok.SneakyThrows;
import my.stock.service.ServiceOnly;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Controller {

    @Autowired
    ServiceOnly serviceOnly;

    @SneakyThrows
    @GetMapping("/save")
    public String getTop3Sectors() {
        serviceOnly.save();
        return "success";
    }
}
